﻿<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<HEAD>
    <META content="IE=11.0000"
          http-equiv="X-UA-Compatible">

    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <TITLE></TITLE>
    <LINK href="/vote/css/style.css" rel="stylesheet" type="text/css">
    <META name="GENERATOR" content="MSHTML 11.00.10586.420">
</HEAD>
<BODY>
<DIV class="wrap" id="header"><IMG src="/vote/images/logo.gif"></DIV>
<DIV class="wrap" id="navbar">
    <DIV class="profile">您好,<span th:text="${session.user}"></span>
        <SPAN class="return"><A href="/vote/show/1/null">返回列表</A></SPAN>
        <SPAN class="addnew"><A href="/vote/ad" th:if="${session.user=='admin'?true:false}">添加新投票</A></SPAN>
        <SPAN class="modify"><A id="tain" th:if="${session.user=='admin'?true:false}">维护</A></SPAN>
        <SPAN class="return"><A href="/vote/cancellation">注销</A></SPAN></DIV>

</DIV>
<DIV class="wrap" id="vote">
    <H2>查看投票</H2>
    <UL class="list">
        <LI th:each="e:${page.records}">
            <H4><span th:text="${e.title}"></span><span th:text="${hid}" style="color:red"></span></H4>
            <P class="info"th:text="'共有' +${e.ccount} +'个选项，已有 '+${e.icount}+' 次投票。'"></P>
            <OL>
                <LI th:each="li:${list}">
                  <span th:text="${li.content}"></span>
                    <DIV class="rate">
                        <DIV class="ratebg">
                            <DIV class="percent" th:style="'width:'+(${li.ocount}/${li.scount}*100)+'%;'"></DIV>
                        </DIV>
                        <P><SPAN th:text="${li.ocount}+'票'"></SPAN><SPAN th:text="'('+(${li.ocount}/${li.scount}*100)+'%)'"></SPAN></P>
                    </DIV>
                </LI>

            </OL>
            <DIV class="goback"><A href="/vote/show/1/null">返回投票列表</A></DIV>
        </LI>
    </UL>
</DIV>
<DIV class="wrap" id="footer"> 北大青鸟 © 版权所有</DIV>
</BODY>
</HTML>
